import { makeAutoObservable } from 'mobx';
class GlobalLoading {

  loadingInfo = {
    loading: false,
    text: '加载中',
  };
  constructor(arg) {
    makeAutoObservable(this);
  }
  setLoading(loading) {
    this.loadingInfo = {...this.loadingInfo, ...loading};
  }
  getLoading() {
    return this.loadingInfo;
  }
}

export default GlobalLoading;